Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

norm(nil) → 0
norm(g(x, y)) → s(norm(x))
f(x, nil) → g(nil, x)
f(x, g(y, z)) → g(f(x, y), z)
rem(nil, y) → nil
rem(g(x, y), 0) → g(x, y)
rem(g(x, y), s(z)) → rem(x, z)

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

norm(nil) → 0
norm(g(x, y)) → s(norm(x))
f(x, nil) → g(nil, x)
f(x, g(y, z)) → g(f(x, y), z)
rem(nil, y) → nil
rem(g(x, y), 0) → g(x, y)
rem(g(x, y), s(z)) → rem(x, z)

Q is empty.

We use [23] with the following order to prove termination.

Recursive path order with status [2].
Precedence:
f2 > nil > rem2
f2 > g2 > norm1 > 0 > rem2
f2 > g2 > s1 > rem2

Status:
norm1: multiset
rem2: multiset
g2: [1,2]
f2: multiset
s1: multiset
0: multiset
nil: multiset